<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/commonTag.jsp"%>
<html>
	<head>
		<title>机构管理</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="${path}/css/backsys/ctx.css">
		<link rel="stylesheet" type="text/css" href="${path}/js/util/confirmer/confir.css"/>
		<script type="text/javascript" src="${path}/js/jquery.js"></script>
		<script language="javascript" type="text/javascript" src="${path}/webutil/DateUtil/WdatePicker.js"></script>
		<script type="text/javascript" src="${path}/js/util/confirmer/jquery-impromptu.3.1.min.js"></script>
		<script type="text/javascript" src="${path}/js/backsys/sysutil.js"></script>
		<script type="text/javascript">
			function searchDept(orgCode) {
				window.location.href="${path}/oa/hr/dept!showScrollDept.action?deptform.type=byOrgCode&deptform.orgCode="+orgCode ;
			}
		</script>
	</head>
	<body>
		<div class="ctx">
			
			<table width="100%" class="blockTable">
				<tr>
					<td>
						<div style="float:left;">
							<a href="${path}/supersystem/oa/hr/addOrganization.jsp" class="zPushBtn"><img src="${path}/images/icon003a2.gif"/><b>新建</b></a>
							<a href="javascript:edit_del('${path}/oa/hr/org!loadByIdOrg.action?baseform.type=updateOrg&org.orgCode=')" class="zPushBtn"><img src="${path}/images/icon003a4.gif"/><b>编辑</b></a>
							<a href="javascript:confirDel('${path}/oa/hr/org!deleteOrg.action?org.orgCode=${org.orgCode}')" class="zPushBtn"><img src="${path}/images/icon003a3.gif"/><b>删除</b></a>
						</div>
					</td>
				</tr>
				<tr>
					<td> 
						<div style="float:left;font-size: 12px;text-align:left;">
							<span>从</span>
							<span><input type="text" class="Wdate" value="<fmt:formatDate value="${orgform.startDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" onClick="WdatePicker()" size="14"/></span>
							<span>至</span>
							
							<span><input type="text" value="<fmt:formatDate value="${orgform.endDate}" pattern="yyyy-MM-dd"/>" onchange="findbydate('${path}/oa/hr/org!showScrollOrg.action?orgform.startDate=#&orgform.endDate=#')" class="Wdate" readonly="readonly" onClick="WdatePicker()" size="14"/></span>
							&nbsp;
							<span>按机构搜索部门:</span>
							<span>
								<select name="dept.organization.orgCode" onchange="searchDept(options[this.selectedIndex].value);">
									<option selected="selected">请选择</option>
									<c:forEach var="org" items="${pageView.records}">
										<option value="${org.orgCode}">${org.orgLegalName}</option>
									</c:forEach>
								</select>
							</span>
							<span>关键词:</span>
							<span><input type="text" id="keywork" value="${orgform.keyword}"/></span>
							<span>
								<a href="javascript:void(0);" onclick="findbykeyword('${path}/oa/hr/org!showScrollOrg.action?orgform.keyword=')" class="button"><b>&nbsp;查询&nbsp;</b></a>
							</span>
						</div>
					</td>
				</tr>
				
				<tr>
					<td>
						<table class="dataTable" width="100%">
								
							<tr class="dataTableHead">
								<td width="6%" align="center">序号</td> 
								<td width="4%"><input type="checkbox" onclick="selectAll()"/></td>
								<td>机构代码</td>
								<td>机构法定名称</td>
								<td>机构法定人</td>
								<td>机构行政电话</td> 
								<td>机构成立地国</td>
								<td>机构成立日期</td>
							</tr>
							
							<c:choose>
								<c:when test="${empty pageView.records}">
									<tr class="dataTableBody">
										<td align="center" colspan="8" height="50">无法找到相关数据!!!</td>
									</tr>
								</c:when>
								<c:otherwise>
									<c:forEach var="org" items="${pageView.records}" varStatus="s">
										<tr class="dataTableBody">
											<td align="center">${s.count}</td>
											<td><input type="checkbox" name="checkbox" value="${org.orgCode}"/></td>
											<td>${org.orgCode}</td>
											<td><a href="${path}/oa/hr/org!loadByIdOrg.action?org.orgCode=${org.orgCode}">${org.orgLegalName}</a></td>
											<td>${org.orgLegalPeople}</td>	
											<td>${org.orgAdminTel}</td>
											<td>${org.establishCountry}</td>
											<td>${org.establishTime}</td>	
										</tr>
									</c:forEach>
								</c:otherwise>
							</c:choose>
							
							<tr class="dataTableBottom">
								<td colspan="12">
									<jsp:include page="/common/fenye.jsp">
										<jsp:param value="/oa/hr/org!showScrollOrg.action" name="action"/>
									</jsp:include>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
